version: '3.9'

services:
  db:
    image: postgres:16-alpine3.19
    container_name: db
    ports:
      - "5432:5432"
    restart: always
    env_file:
      - .env
    volumes:
      - ./data/db:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD", "pg_isready"]
      interval: 10s
      timeout: 5s
      retries: 5